package ar.edu.itba.it.cg.grupo01.impl.color;


import static com.google.common.base.Preconditions.*;

import ar.edu.itba.it.cg.grupo01.api.color.ColorVariation;

public class ColorVariationFactory {

	public ColorVariation forName(String name) {

		checkNotNull(name, "Color variation name should not be null");

		if (name.equals("linear")) {
			return new LinearVariation();
		} else if (name.equals("log")) {
			return new LogVariation();
		}

		throw new IllegalArgumentException("No color variation for name: " + name);
	}

}
